package com.tfswx.ruleengine.database.service;

import com.tfswx.ruleengine.compute.bean.FfItem;
import com.tfswx.ruleengine.compute.bean.GzDataDTO;
import com.tfswx.ruleengine.compute.bean.RuleInfo;
import com.tfswx.ruleengine.database.dto.GzImportInputDTO;
import com.tfswx.ruleengine.database.dto.GzImportOutputDTO;
import com.tfswx.ruleengine.database.dto.RuleInfoListQueryParam;

import java.util.List;

/**
 * @author Ricky
 * @date 2021/6/11
 */
public interface GzyqService {

    void execute(String sql);

    String getDatabaseId();

    /**
     * 根据gzflbs获取规则列表
     *
     * @param ruleInfoListQueryParam ruleInfoListQueryParam
     * @return java.util.List<com.tfswx.ruleengine.compute.bean.RuleInfo>
     * @author Ricky
     * @date 2021/6/11
     */
    List<RuleInfo> queryRuleInfoList(RuleInfoListQueryParam ruleInfoListQueryParam);

    List<FfItem> queryFnList();

    void loadFnList();

    /**
     * 导入规则
     *
     * @param gzImportInputDTO gzImportInputDTO
     * @return com.tfswx.ruleengine.compute.dto.GzImportOutputDTO
     * @author Ricky
     * @date 2021/6/11
     */
    GzImportOutputDTO importGz(GzImportInputDTO gzImportInputDTO);

    GzImportOutputDTO importGz(GzDataDTO gzData);

    /**
     * 创建表
     *
     * @author Ricky
     * @date 2021/6/11
     */
    void createTable();

    /**
     * 删除表
     *
     * @author Ricky
     * @date 2021/6/11
     */
    void dropTable();

    /**
     * 清空表
     *
     * @author Ricky
     * @date 2021/6/11
     */
    void truncateTable();

    GzDataDTO exportGz(String xmbm);
}
